From: Roger Pau Monné Date: Tue, 10 Nov 2015 11:05:35 +0000 (+0100) Subject: x86: allow disabling the emulated IOMMU X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2290 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7ee5a150fc508785070087fc0ddcfc2f9771ea89;p=xen.git x86: allow disabling the emulated IOMMU Signed-off-by: Roger Pau Monné Acked-by: Andrew Cooper Acked-by: Aravind Gopalakrishnan --- diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/amd/iommu_guest.c index e74f4692f4..b4e75ac565 100644 --- a/xen/drivers/passthrough/amd/iommu_guest.c +++ b/xen/drivers/passthrough/amd/iommu_guest.c @@ -887,7 +887,8 @@ int guest_iommu_init(struct domain* d) struct guest_iommu *iommu; struct hvm_iommu *hd = domain_hvm_iommu(d); - if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled ) + if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled || + !has_viommu(d) ) return 0; iommu = xzalloc(struct guest_iommu);